<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOnlineExhibitionAuthors extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('online_exhibition_authors', function (Blueprint $table) {
                $table->bigInteger("online_exhibition_id")->comment("在线展厅id");
                $table->bigInteger("author_id")->comment("作者id");
                $table->unique(["online_exhibition_id","author_id"]);

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('online_exhibition_authors');
    }
}
